<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!-- 引入组件库 -->
    <script src="../js/vue.js"></script>
    <script src="../plugins/elementui/index.js"></script>
    <script type="text/javascript" src="../js/jquery.min.js"></script>
</head>
<body>
    <div id="app">
        <input type="text" @keyup.delete="fun2()" v-model="username">
    </div>

   <script>
       new Vue({
           el:"#app",
           data:{
             username:'myname'
           },
           methods:{
               fun2(){
                   alert(this.username);
               }
           }


       })
   </script>

</body>
</html>